package com.wy2.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@GenericGenerator(name="user-uuid", strategy = "uuid")
public class User {
	@Id
	@GeneratedValue(generator="user-uuid")
	
	private String uid; //编号
	private String uname;  // 登录名
	private String upassword;  // 密码upassword
	private String uislockout;  //是否锁定uislockout
	private String ulastlogintime; // 最后一次登录时间ulastlogintime
	private String ucreatetime; // 用户创建时间ucreatetime
	private int upsdwrongtime;  // 密码错误次数upsdwrongtime
	private String ulocktime;  // 锁定时间ulocktime
	private String uprotectemail; // 邮箱uprotectemail
	private String uprotectmetl; // 手机号uprotectmetl
	private String uidcard; // 身份证uidcard
	private int uleijipwderrornum; // 累加10次uleijipwderrornum
	private int weight;
	
	private Role role;

	public User(String uid, String uname, String upassword, String uislockout, String ulastlogintime,
			String ucreatetime, int upsdwrongtime, String ulocktime, String uprotectemail, String uprotectmetl,
			String uidcard, int uleijipwderrornum, int weight, Role role) {
		super();
		this.uid = uid;
		this.uname = uname;
		this.upassword = upassword;
		this.uislockout = uislockout;
		this.ulastlogintime = ulastlogintime;
		this.ucreatetime = ucreatetime;
		this.upsdwrongtime = upsdwrongtime;
		this.ulocktime = ulocktime;
		this.uprotectemail = uprotectemail;
		this.uprotectmetl = uprotectmetl;
		this.uidcard = uidcard;
		this.uleijipwderrornum = uleijipwderrornum;
		this.weight = weight;
		this.role = role;
	}

	public User() {
		super();
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getUpassword() {
		return upassword;
	}

	public void setUpassword(String upassword) {
		this.upassword = upassword;
	}

	public String getUislockout() {
		return uislockout;
	}

	public void setUislockout(String uislockout) {
		this.uislockout = uislockout;
	}

	public String getUlastlogintime() {
		return ulastlogintime;
	}

	public void setUlastlogintime(String ulastlogintime) {
		this.ulastlogintime = ulastlogintime;
	}

	public String getUcreatetime() {
		return ucreatetime;
	}

	public void setUcreatetime(String ucreatetime) {
		this.ucreatetime = ucreatetime;
	}

	public int getUpsdwrongtime() {
		return upsdwrongtime;
	}

	public void setUpsdwrongtime(int upsdwrongtime) {
		this.upsdwrongtime = upsdwrongtime;
	}

	public String getUlocktime() {
		return ulocktime;
	}

	public void setUlocktime(String ulocktime) {
		this.ulocktime = ulocktime;
	}

	public String getUprotectemail() {
		return uprotectemail;
	}

	public void setUprotectemail(String uprotectemail) {
		this.uprotectemail = uprotectemail;
	}

	public String getUprotectmetl() {
		return uprotectmetl;
	}

	public void setUprotectmetl(String uprotectmetl) {
		this.uprotectmetl = uprotectmetl;
	}

	public String getUidcard() {
		return uidcard;
	}

	public void setUidcard(String uidcard) {
		this.uidcard = uidcard;
	}

	public int getUleijipwderrornum() {
		return uleijipwderrornum;
	}

	public void setUleijipwderrornum(int uleijipwderrornum) {
		this.uleijipwderrornum = uleijipwderrornum;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	@Override
	public String toString() {
		return "User [uid=" + uid + ", uname=" + uname + ", upassword=" + upassword + ", uislockout=" + uislockout
				+ ", ulastlogintime=" + ulastlogintime + ", ucreatetime=" + ucreatetime + ", upsdwrongtime="
				+ upsdwrongtime + ", ulocktime=" + ulocktime + ", uprotectemail=" + uprotectemail + ", uprotectmetl="
				+ uprotectmetl + ", uidcard=" + uidcard + ", uleijipwderrornum=" + uleijipwderrornum + ", weight="
				+ weight + ", role=" + role + "]";
	}
	
	

}
